Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
La consulta coincidente no existe ERROR: "__.models.__.DoesNotExist: __ la consulta coincidente no existe".

Estoy tratando de enviar datos a mi base de datos usando el archivo Django Models and Views, pero recibo continuamente este error: "raise self.model.DoesNotExist( crm.models.Time_Stamps.DoesNotExist: la consulta de coincidencia de Time_Stamps no existe".

Tengo 'Time_Stamps' como modelo en el archivo models.py.

¿Como resolverlo?

vistas.py

 def update_counter(request): if request.method == 'POST': timestamp = Time_Stamps.objects.get() counterValue = request.POST['counter'] #timestamp.Task_ID = counterValue timestamp.startTime = request.POST['timestamp'] print(counterValue) print(startTime) timestamp.save() message = 'update successful' return HttpResponse(message)

modelos.py

 class Time_Stamps(models.Model): TimeStamp = models.IntegerField(default=0) def __str__(self): return self.TimeStamp class Meta: verbose_name_plural = 'TimeStamps'

ERROR

 ...................... File "C:\Users\kushw\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\models\query.py", line 435, in get raise self.model.DoesNotExist( crm.models.Time_Stamps.DoesNotExist: Time_Stamps matching query does not exist. [24/Sep/2021 15:44:27] "POST /update_counter/ HTTP/1.1" 500 73227
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!